<%@ include file="/include/head.jsp"%>
<html>
	<head>
		<title>list</title>
	</head>

	<body>
		<div>
			<h1 align="center">List:</h1>
			<a style="float: right;" href="<%=contextPath%>/logout.do">Logout</a>
		</div>
		<hr />
		<center>
			<table width="500px" border="1">
				<tr>
					<td>ID</td>
					<td>UserName</td>
					<td>Email</td>
					<td>Age</td>
					<td>Sex</td>
					<td width="30%">Function</td>
				</tr>
				<s:iterator value="users">
					<tr>
						<td>${id}</td>
						<td>${username}</td>
						<td>${email}</td>
						<td>${age}</td>
						<td>
							<s:if test="sex == 1">男</s:if>
							<s:else>女</s:else>
						</td>
						<td>
							<a href="findById.do?id=${id}">modify</a>|
							<a href="delete.do?id=${id}" onclick="return confirm('really delete?')">delete</a>
						</td>
					</tr>
				</s:iterator>
			</table>
			<br />
			<a href="add.jsp">Add</a>
		</center>
	</body>
</html>
